package org.zcl.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.zcl.entity.model.ApiResponse;

import java.util.Map;

/**
 * 指数控制器
 *
 * @author zhuchenglin
 * @date 2022/09/07 13:47
 * @since 2022/8/24 17:56
 */
@Api(value = "/index", tags = {"指数控制器"})
@RestController
@RequestMapping("/index")
@Slf4j
public class IndexController extends BaseAction {

    /**
     * 订单
     *
     * @param resMap res地图
     * @return {@link ApiResponse}<{@link Map}<{@link String}, {@link String}>>
     */
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "Map<String, String>", name = "resMap", value = "resMap")
    })
    @ApiOperation(value = "订单", notes = "订单", httpMethod = "POST")
    @PostMapping(value = "/testSn")
    public ApiResponse<Map<String, String>> order(@RequestParam(required = false) Map<String, String> resMap) {
        return returnSuccess(resMap);
    }

}
